package com.synergy.stockflow.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "unit_conversion")
public class UnitConversion {
    /**
     * 单位ID
     */
    @TableId(value = "unit_id", type = IdType.ASSIGN_ID)
    @Schema(description = "单位ID")
    private String unitId;

    /**
     * 单位名称
     */
    @TableField(value = "unit_name")
    @Schema(description = "单位名称")
    private String unitName;

    /**
     * 基础单位ID
     */
    @TableField(value = "base_unit_id")
    @Schema(description = "基础单位ID")
    private String baseUnitId;

    /**
     * 转换率
     */
    @TableField(value = "conversion_rate")
    @Schema(description = "转换率")
    private BigDecimal conversionRate;

    /**
     * 是否启用(1=是, 0=否)
     */
    @TableField(value = "`status`")
    @Schema(description = "是否启用(1=是, 0=否)")
    private Integer status;

    /**
     * 创建者
     */
    @TableField(value = "create_by")
    @Schema(description = "创建者")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 修改者
     */
    @TableField(value = "update_by")
    @Schema(description = "修改者")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @Schema(description = "更新时间")
    private Date updateTime;

    /**
     * 是否为主单位(1=是, 0=否)
     */
    @TableField(value = "is_main_unit")
    @Schema(description = "是否为主单位(1=是, 0=否)")
    private Integer isMainUnit;
}